home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
os2
/
pvm34b3.zip
/
pvm34b3
/
pvm3
/
examples
/
OS2
/
Makefile.os2
< prev
Wrap
Makefile
|
1997-08-08
|
8KB
|
265 lines
#
# $Id: Makefile.aimk,v 1.11 1997/07/02 14:34:44 pvmsrc Exp $
#
# Makefile.aimk for PVM example programs.
#
# Set PVM_ROOT to the path where PVM includes and libraries are installed.
# Set PVM_ARCH to your architecture type (SUN4, HP9K, RS6K, SGI, etc.)
# Set ARCHLIB to any special libs needed on PVM_ARCH (-lrpc, -lsocket, etc.)
# otherwise leave ARCHLIB blank
#
# PVM_ARCH and ARCHLIB are set for you if you use "$PVM_ROOT/lib/aimk"
# instead of "make".
#
# aimk also creates a $PVM_ARCH directory below this one and will cd to it
# before invoking make - this allows building in parallel on different arches.
#
SHELL = /bin/ksh
PVMDIR = ../..
SDIR = $(PVMDIR)/examples
BDIR = $(PVMDIR)/bin
XDIR = $(BDIR)/$(PVM_ARCH)
CFLOPTS = -g
CFLAGS = $(CFLOPTS) -I$(PVMDIR)/include $(ARCHCFLAGS)
##### Need to select some architecture-specific libraries to link tasks #####
# The default setup is for workstations
### Select PVMLIB depending on architecture.
# For MPPs (PGON and SP2MPI) select:
# PVMLIB = -lpvm3pe
# For Workstations and shared memory architectures select:
# PVMLIB = -lpvm3
PVMLIB = -lpvm3
### Select the PVMHLIB depending on architecture
# Host versions of programs use sockets to communicate with the daemon.
# They can be built with aimk hostprogs, they are only necessary for
# MPPs and are OPTIONAL for other architectures
#
# For MPPs and Workstations select
# PVMHLIB = -lpvm3
# for Shared Memory Archtiectures
# PVMHLIB = -lpvm3s
PVMHLIB = -lpvm3
#############################################################################
LIBS = $(PVMLIB) $(ARCHLIB)
HLIBS = $(PVMHLIB) $(ARCHLIB)
GLIBS = -lgpvm3
#F77 = f77
FORT = g77
FFLOPTS = -g
FFLAGS = $(FFLOPTS) $(ARCHFFLAGS)
FLIBS = -lfpvm3
LFLAGS = $(LOPT) -L$(PVMDIR)/lib/$(PVM_ARCH)
CPROGS = hello$(EXESFX) hello_other$(EXESFX) \
gexample$(EXESFX) \
master1$(EXESFX) master1h$(EXESFX) slave1$(EXESFX) \
spmd$(EXESFX) \
timing$(EXESFX) timing_slave$(EXESFX) \
gmbi$(EXESFX) \
dbwtest$(EXESFX) ibwtest$(EXESFX) pbwtest$(EXESFX) rbwtest$(EXESFX)
HOSTCPROGS = helloh$(EXESFX) gexampleh$(EXESFX) master1h$(EXESFX) timingh$(EXESFX) gmbih$(EXESFX)
FPROGS = fgexample$(EXESFX) fmaster1$(EXESFX) fslave1$(EXESFX) fspmd$(EXESFX) hitc$(EXESFX) hitc_slave$(EXESFX)
HOSTFPROGS = fmaster1h$(EXESFX) hitch$(EXESFX)
CTXPROGS = inherita$(EXESFX) inheritb$(EXESFX) inherit1$(EXESFX) inherit2$(EXESFX) inherit3$(EXESFX)
MBPROGS = taskf.o task0$(EXESFX) task1$(EXESFX) task_end$(EXESFX) rme$(EXESFX) lmbi$(EXESFX) gmbi$(EXESFX)
default: hello$(EXESFX) hello_other$(EXESFX)
all: c-all f-all
c-all: $(CPROGS) $(CTXPROGS) $(MBPROGS)
f-all: $(FPROGS)
hostprogs: $(HOSTCRPROGS) $(HOSTFPROGS)
clean:
rm -f *.o $(CPROGS) $(FPROGS) $(CTXPROGS) $(MBPROGS)
$(XDIR):
- mkdir $(BDIR)
- mkdir $(XDIR)
hello$(EXESFX): $(SDIR)/hello.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/hello.c $(LFLAGS) $(LIBS)
mv $@ $(XDIR)
helloh$(EXESFX): $(SDIR)/hello.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/hello.c $(LFLAGS) $(HLIBS)
mv $@ $(XDIR)
hello_other$(EXESFX): $(SDIR)/hello_other.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/hello_other.c $(LFLAGS) $(LIBS)
mv $@ $(XDIR)
dbwtest$(EXESFX): $(SDIR)/bwtest.c $(XDIR)
$(CC) $(CFLAGS) -DENCODE=PvmDataDefault -DPACK -o $@ \
$(SDIR)/bwtest.c $(LFLAGS) $(GLIBS) $(LIBS)
mv $@ $(XDIR)
ibwtest$(EXESFX): $(SDIR)/bwtest.c $(XDIR)
$(CC) $(CFLAGS) -DPACK -DENCODE=PvmDataInPlace -o $@ \
$(SDIR)/bwtest.c $(LFLAGS) $(GLIBS) $(LIBS)
mv $@ $(XDIR)
pbwtest$(EXESFX): $(SDIR)/bwtest.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/bwtest.c $(LFLAGS) $(GLIBS) $(LIBS)
mv $@ $(XDIR)
rbwtest$(EXESFX): $(SDIR)/bwtest.c $(XDIR)
$(CC) $(CFLAGS) -DPACK -DENCODE=PvmDataRaw -o $@ \
$(SDIR)/bwtest.c $(LFLAGS) $(GLIBS) $(LIBS)
mv $@ $(XDIR)
timing$(EXESFX): $(SDIR)/timing.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/timing.c $(LFLAGS) $(LIBS)
mv $@ $(XDIR)
timingh$(EXESFX): $(SDIR)/timing.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/timing.c $(LFLAGS) $(HLIBS)
mv $@ $(XDIR)
timing_slave$(EXESFX): $(SDIR)/timing_slave.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/timing_slave.c $(LFLAGS) $(LIBS)
mv $@ $(XDIR)
spmd$(EXESFX): $(SDIR)/spmd.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/spmd.c $(LFLAGS) $(LIBS)
mv $@ $(XDIR)
fspmd$(EXESFX): $(SDIR)/spmd.f $(XDIR)
$(FORT) $(FFLAGS) -o $@ $(SDIR)/spmd.f $(LFLAGS) $(FLIBS) $(LIBS)
mv $@ $(XDIR)
master1$(EXESFX): $(SDIR)/master1.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/master1.c $(LFLAGS) $(LIBS)
mv $@ $(XDIR)
master1h$(EXESFX): $(SDIR)/master1.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/master1.c $(LFLAGS) $(HLIBS)
mv $@ $(XDIR)
slave1$(EXESFX): $(SDIR)/slave1.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/slave1.c $(LFLAGS) $(LIBS)
mv $@ $(XDIR)
fmaster1$(EXESFX): $(SDIR)/master1.f $(XDIR)
$(FORT) $(FFLAGS) -o $@ $(SDIR)/master1.f $(LFLAGS) $(FLIBS) $(LIBS)
mv $@ $(XDIR)
fmaster1h$(EXESFX): $(SDIR)/master1.f $(XDIR)
$(FORT) $(FFLAGS) -o $@ $(SDIR)/master1.f $(LFLAGS) $(FLIBS) $(HLIBS)
mv $@ $(XDIR)
fslave1$(EXESFX): $(SDIR)/slave1.f $(XDIR)
$(FORT) $(FFLAGS) -o $@ $(SDIR)/slave1.f $(LFLAGS) $(FLIBS) $(LIBS)
mv $@ $(XDIR)
hitc$(EXESFX): $(SDIR)/hitc.f $(XDIR)
$(FORT) $(FFLAGS) -o $@ $(SDIR)/hitc.f $(LFLAGS) $(FLIBS) $(LIBS)
mv $@ $(XDIR)
hitch$(EXESFX): $(SDIR)/hitc.f $(XDIR)
$(FORT) $(FFLAGS) -o $@ $(SDIR)/hitc.f $(LFLAGS) $(FLIBS) $(HLIBS)
mv $@ $(XDIR)
hitc_slave$(EXESFX): $(SDIR)/hitc_slave.f $(XDIR)
$(FORT) $(FFLAGS) -o $@ $(SDIR)/hitc_slave.f $(LFLAGS) $(FLIBS) $(LIBS)
mv $@ $(XDIR)
gexample$(EXESFX): $(SDIR)/gexample.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/gexample.c $(LFLAGS) $(GLIBS) $(LIBS)
mv $@ $(XDIR)
gexampleh$(EXESFX): $(SDIR)/gexample.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/gexample.c $(LFLAGS) $(GLIBS) $(HLIBS)
mv $@ $(XDIR)
fgexample$(EXESFX): $(SDIR)/gexample.f $(XDIR)
$(FORT) $(FFLAGS) -o $@ $(SDIR)/gexample.f $(LFLAGS) $(FLIBS) $(GLIBS) $(LIBS)
mv $@ $(XDIR)
mbox$(EXESFX): $(SDIR)/mbox.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/mbox.c $(LFLAGS) $(LIBS)
mv $@ $(XDIR)
inherita$(EXESFX): $(SDIR)/inherita.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/inherita.c $(LFLAGS) $(LIBS)
mv $@ $(XDIR)
inheritb$(EXESFX): $(SDIR)/inheritb.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/inheritb.c $(LFLAGS) $(LIBS)
mv $@ $(XDIR)
inherit1$(EXESFX): $(SDIR)/inherit1.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/inherit1.c $(LFLAGS) $(LIBS)
mv $@ $(XDIR)
inherit2$(EXESFX): $(SDIR)/inherit2.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/inherit2.c $(LFLAGS) $(LIBS)
mv $@ $(XDIR)
inherit3$(EXESFX): $(SDIR)/inherit3.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/inherit3.c $(LFLAGS) $(LIBS)
mv $@ $(XDIR)
taskf.o: $(SDIR)/taskf.c
$(CC) $(CFLAGS) -c -o taskf.o $(SDIR)/taskf.c
task0$(EXESFX): $(SDIR)/task0.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/task0.c taskf.o $(LFLAGS) $(LIBS)
mv $@ $(XDIR)
task1$(EXESFX): $(SDIR)/task1.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/task1.c taskf.o $(LFLAGS) $(LIBS)
mv $@ $(XDIR)
task_end$(EXESFX):$(SDIR)/task_end.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/task_end.c taskf.o $(LFLAGS) $(LIBS)
mv $@ $(XDIR)
rme$(EXESFX):$(SDIR)/rme.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/rme.c taskf.o $(LFLAGS) $(LIBS)
mv $@ $(XDIR)
lmbi$(EXESFX):$(SDIR)/lmbi.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/lmbi.c taskf.o $(LFLAGS) $(HLIBS)
mv $@ $(XDIR)
gmbi$(EXESFX):$(SDIR)/gmbi.c taskf.o $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/gmbi.c taskf.o $(LFLAGS) $(LIBS)
mv $@ $(XDIR)
gmbih$(EXESFX):$(SDIR)/gmbi.c taskf.o $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/gmbi.c taskf.o $(LFLAGS) $(HLIBS)
mv $@ $(XDIR)
mhf_server$(EXESFX):$(SDIR)/mhf_server.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/mhf_server.c $(LFLAGS) $(LIBS)
mv $@ $(XDIR)
mhf_tickle$(EXESFX):$(SDIR)/mhf_tickle.c $(XDIR)
$(CC) $(CFLAGS) -o $@ $(SDIR)/mhf_tickle.c $(LFLAGS) $(LIBS)
mv $@ $(XDIR)